<template>
	<view class="container">
		<view class="type1" v-if="type == 1">
			<image class="icon" src="../../../static/images/center/iconGou.png" mode=""></image>
			<text class="title">支付成功</text>
			<text class="label">你已成功购买{{count}}点提货卡，共计付款{{money}}元，立即签约提货卡购买合同即可使用</text>
			<view class="btn" @tap="submit">提货卡购买合同</view>
		</view>
		<view class="type2" v-if="type == 2">
			<image class="icon" src="../../../static/images/center/iconGou.png" mode=""></image>
			<text class="title">修改成功</text>
			<view class="btn" @tap="submit">提货卡购买合同</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 0,
				count: 0,
				money: 0,
				order_id: ""
			}
		},
		onLoad(option) {
			if(option.count) {
				this.count = option.count
				this.money = option.money
			}
			this.type = option.type
			this.order_id = option.orderId
		},
		methods: {
			submit() {
				uni.redirectTo({
					url: "./pickCardBuyCon?orderId=" + this.order_id + "&type=1"
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	.container {
		
		.type1,.type2{
			display: flex;
			flex-direction: column;
			align-items: center;
		}
		.icon {
			padding: 150rpx 0 50rpx;
			width: 120rpx;
			height: 120rpx;
		}

		.title {
			font-size: 36rpx;
			font-weight: 600;
			color: #333333;
		}

		.label {
			padding: 60rpx 100rpx 0;
			font-size: 28rpx;
			color: #333333;
			line-height: 48rpx;
			text-align: center;
		}

		.btn {
			margin-top: 100rpx;
			width: 300rpx;
			height: 80rpx;
			background: linear-gradient(90deg, #FBCC2B 0%, #FBDC72 100%);
			border-radius: 40rpx;
			font-size: 32rpx;
			font-weight: 600;
			color: #333333;
			line-height: 80rpx;
			text-align: center;
		}
	}
</style>
